You are here: Symbol Reference > Dew Namespace > Dew.Stats Namespace > Dew.Stats.Units Namespace > Classes > StatRandom Class > StatRandom Methods > StatRandom.RandomHypGeometric Method
Dew Stats for .NET
ContentsIndexHome
PreviousUpNext
StatRandom.RandomHypGeometric Method

Hypergeometric distribution random generator.

Syntax
C#
Visual Basic
public static void RandomHypGeometric([In] int M, [In] int K, [In] int N, [In] TMtxVecInt Results, int Seed);

This routine generates Result.Length pseudo random numbers, using the hypergeometric distribution with parameters M (lot size), K (size of sampling) and N (marked elements in the lot). The random numbers are stored in the Results vector. An exception is raised if Result vector is complex.

Generate 2000 random numbers by using the hypergeometric distribution with parameters M=100, K=50 and N=30.

using Dew.Math; using Dew.Stats.Units; namespace Dew.Examples { private void Example() { VectorInt r = new VectorInt(2000); StatRandom.RandomHypGeometric(100,50,30,r, -1); } }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!